package s47.dqj.dao;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.Query;
import org.hibernate.SessionFactory;

import s47.dqj.bean.DepartmentPerson;

public interface DepartmentPersonDaoInf {

	@Resource(name = "sessionFactory")
	public abstract void setSupperSessionFactory(SessionFactory sessionFactory);

	/**
	 * 获取全部人员信息
	 * @return
	 */
	public abstract List<DepartmentPerson> findAll();

	/**
	 * 查询在职/退休/离职的员工
	 * @return
	 */
	public abstract List<DepartmentPerson> findAllByDpstate(
			DepartmentPerson departmentPerson);

	/**
	 * 通过dtid查询该部门所以员工
	 * @param departmentPerson
	 * @return
	 */
	public abstract List<DepartmentPerson> findAllByDtid(
			DepartmentPerson departmentPerson);

	/**
	 * 通过dpnameSimple查询员工资料(精确查找)
	 * @param departmentPerson
	 * @return
	 */
	public abstract List<DepartmentPerson> findObjectByDpnameSimple(
			DepartmentPerson departmentPerson);

	/**
	 * 通过dpnameSimple和dtid查询员工资料(挂号时用)
	 * @param departmentPerson
	 * @return
	 */
	public abstract List<DepartmentPerson> findObjectByDpnameSimpleAndDtid(
			DepartmentPerson departmentPerson);

	/**
	 * 添加员工
	 * @param departmentPerson
	 */
	public abstract void save(DepartmentPerson departmentPerson);

	/**
	 * 修改员工资料
	 * @param departmentPerson
	 */
	public abstract void update(DepartmentPerson departmentPerson);
	
	/**
	 * 根据dpid查找
	 * @param departmentPerson
	 * @return
	 */
	public abstract DepartmentPerson findObject(DepartmentPerson departmentPerson);
}